<div class="bjui-pageHeader">
    <div class="pull-right">
        <button class="btn-default" data-icon="plus" title="添加广告" data-toggle="tooltip" data-placement="left" onclick="createDialog('{:U("Forms/adv")}', '添加广告', 'add_adv' ,{width:800, height:500})"></button>
        <a href="{:U('Forms/del_ad')}" class="btn btn-default" data-toggle="doajaxchecked" data-icon="remove" data-callback="callbackRefres" data-confirm-msg="要删除全部选中的吗??" data-idname="id" data-group="ids"></a>
        <button class="btn-default" data-icon="refresh" onclick="$.CurrentNavtab.navtab('refresh')"></button>
    </div>
    <form id="pagerForm" data-toggle="ajaxsearch" data-loadingmask="true" action="{:U('index')}" method="post">
        <input type="hidden" name="pageSize" value="{:I('param.pageSize')}" />
        <input type="hidden" name="pageCurrent" value="{:I('param.pageCurrent')}" />
        <input type="hidden" name="orderField" value="{:I('param.orderField')}" />
        <input type="hidden" name="orderDirection" value="{:I('param.orderDirection')}" />
        <div class="bjui-searchBar">
            <label>广告名称:</label>
            <input type="text" name="name" value="{:I('name')}"/>
            <label>所属广告位置</label>
            <select name="place_id" data-toggle="selectpicker">
                <option value="0">全部分类</option>
                <volist name="res" id="va">
                   <option value="{$va.id}" <if condition="I('place_id') eq $va['id']">selected="selected"</if>>{$va.name}</option>
                </volist>
            </select>
            <button type="submit" class="btn-default" data-icon="search">查询</button>
            <a class="btn btn-orange" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">清空查询 </a>
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="false">
        <thead>
        <tr>
            <th width="26"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
            <th>广告名称</th>
            <th>位置名称</th>
            <th>开始时间</th>
            <th>结束时间</th>
            <th>状态</th>
            <th width="100">操作</th>
        </tr>
        </thead>
        <tbody>
        <volist name="list" id="vo">
        <tr>
            <td width="26"><input type="checkbox" value="{$vo.id}" class="checkboxCtrl" name="ids" data-toggle="icheck"></td>
            <td><a href="{$vo.url}" target="_blank">{$vo.name}</a></td>
            <td>{$vo.placename}</td>
            <td>{$vo.start_time}</td>
            <td>{$vo.end_time}</td>
            <if condition="$vo.status eq '0'">
            <td><a href="{:U('Forms/update_ad',array('id'=>$vo['id']))}" data-type="get" data-toggle="doajax" data-confirm-msg="更改显示状态???">显示</a></td>
            <else/>
            <td><a href="{:U('Forms/update_ad',array('id'=>$vo['id']))}" data-type="get" data-toggle="doajax" data-confirm-msg="更改关闭状态???">已关闭</a></td>
            </if>
            <td>
                <button type="button" class="btn-green" onclick="createDialog('{:U("Forms/adv",array("id"=>$vo["id"]))}', '修改广告', 'add_adv', {width:800, height:450})">改</button>
                <a href="{:U('Forms/del_ad',array('id'=>$vo['id']))}" data-type="get" class="btn btn-red" data-toggle="doajax" data-confirm-msg="你确定要删除此广告吗？" >删</a>
            </td>
        </tr>
        </volist>
        </tbody>
    </table>
</div>
<include file="Common/footer" ftype="page" />